package com.lucas.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lucas.pojo.Lagou_auth_code;
import org.springframework.stereotype.Service;


public interface AuthCodeService extends IService<Lagou_auth_code>{

    /**
     * 创建验证码，入库，并发送
     * @param email
     * @return
     */
    boolean createAndSendCode(String email);

    /**
     * 验证验证码是否有效 0正确1错误2超时
     * @param email
     * @param code
     * @return
     */
    Integer validate(String email, String code);
}
